<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE" />
        <title>发布到gitbook.com | Gitbook 入门教程</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.0.1">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    
    
    <link rel="next" href="../publish/github.html" />
    
    
    <link rel="prev" href="../publish/index.html" />
    

        
    </head>
    <body>
        
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
    

        
    <div class="book" data-level="4.1" data-basepath=".." data-revision="Mon Apr 13 2015 22:06:22 GMT+0800 (中国标准时间)">
    

<div class="book-summary">
    <div class="book-search">
        <input type="text" placeholder="Type to search" class="form-control" />
    </div>
    <ul class="summary">
        
        
        
        

        

        
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="howtouse/index.html">
            
                
                    <a href="../howtouse/index.html">
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        基本安装
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="howtouse/Nodejsinstall.html">
            
                
                    <a href="../howtouse/Nodejsinstall.html">
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        Node.js安装
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="howtouse/gitbookinstall.html">
            
                
                    <a href="../howtouse/gitbookinstall.html">
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        Gitbook安装
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="howtouse/gitbookcli.html">
            
                
                    <a href="../howtouse/gitbookcli.html">
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        Gitbook命令行速览
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="book/index.html">
            
                
                    <a href="../book/index.html">
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        图书编辑
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="book/gitbook-cli.html">
            
                
                    <a href="../book/gitbook-cli.html">
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        gitbook命令行&amp;markdown编辑
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="book/editor.html">
            
                
                    <a href="../book/editor.html">
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        gitbook editor编辑
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="output/index.html">
            
                
                    <a href="../output/index.html">
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        图书输出
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="output/outfile.html">
            
                
                    <a href="../output/outfile.html">
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        输出为静态网站
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="output/pdfandebook.html">
            
                
                    <a href="../output/pdfandebook.html">
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        输出PDF
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="publish/index.html">
            
                
                    <a href="../publish/index.html">
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        发布
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="4.1" data-path="publish/gitbook.html">
            
                
                    <a href="../publish/gitbook.html">
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        发布到gitbook.com
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="publish/github.html">
            
                
                    <a href="../publish/github.html">
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        发布到github仓库
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="publish/gitpages.html">
            
                
                    <a href="../publish/gitpages.html">
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        发布到Github Pages
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="end/index.html">
            
                
                    <a href="../end/index.html">
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        结束
                    </a>
                
            
            
        </li>
    


        
        <li class="divider"></li>
        <li>
            <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                Published with GitBook
            </a>
        </li>
        
    </ul>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header">
    <!-- Actions Left -->
    <a href="#" class="btn pull-left toggle-summary" aria-label="Table of Contents"><i class="fa fa-align-justify"></i></a>
    <a href="#" class="btn pull-left toggle-search" aria-label="Search"><i class="fa fa-search"></i></a>
    
    <div id="font-settings-wrapper" class="dropdown pull-left">
        <a href="#" class="btn toggle-dropdown" aria-label="Font Settings"><i class="fa fa-font"></i>
        </a>
        <div class="dropdown-menu font-settings">
    <div class="dropdown-caret">
        <span class="caret-outer"></span>
        <span class="caret-inner"></span>
    </div>

    <div class="buttons">
        <button type="button" id="reduce-font-size" class="button size-2">A</button>
        <button type="button" id="enlarge-font-size" class="button size-2">A</button>
    </div>

    <div class="buttons font-family-list">
        <button type="button" data-font="0" class="button">Serif</button>
        <button type="button" data-font="1" class="button">Sans</button>
    </div>

    <div class="buttons color-theme-list">
        <button type="button" id="color-theme-preview-0" class="button size-3" data-theme="0">White</button>
        <button type="button" id="color-theme-preview-1" class="button size-3" data-theme="1">Sepia</button>
        <button type="button" id="color-theme-preview-2" class="button size-3" data-theme="2">Night</button>
    </div>
</div>

    </div>

    <!-- Actions Right -->
    
    <div class="dropdown pull-right">
        <a href="#" class="btn toggle-dropdown" aria-label="Share"><i class="fa fa-share-alt"></i>
        </a>
        <div class="dropdown-menu font-settings dropdown-left">
            <div class="dropdown-caret">
                <span class="caret-outer"></span>
                <span class="caret-inner"></span>
            </div>
            <div class="buttons">
                <button type="button" data-sharing="twitter" class="button">
                    Share on Twitter
                </button>
                <button type="button" data-sharing="google-plus" class="button">
                    Share on Google
                </button>
                <button type="button" data-sharing="facebook" class="button">
                    Share on Facebook
                </button>
                <button type="button" data-sharing="weibo" class="button">
                    Share on Weibo
                </button>
                <button type="button" data-sharing="instapaper" class="button">
                    Share on Instapaper
                </button>
            </div>
        </div>
    </div>
    

    
    <a href="#" target="_blank" class="btn pull-right google-plus-sharing-link sharing-link" data-sharing="google-plus" aria-label="Google"><i class="fa fa-google-plus"></i></a>
    
    
    <a href="#" target="_blank" class="btn pull-right facebook-sharing-link sharing-link" data-sharing="facebook" aria-label="Facebook"><i class="fa fa-facebook"></i></a>
    
    
    <a href="#" target="_blank" class="btn pull-right twitter-sharing-link sharing-link" data-sharing="twitter" aria-label="Twitter"><i class="fa fa-twitter"></i></a>
    
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >Gitbook 入门教程</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="%E5%8F%91%E5%B8%83%E5%88%B0gitbook-com">&#x53D1;&#x5E03;&#x5230;Gitbook.com</h1>
<p><a href="gitbook.com">GitBook.com</a> &#x662F;&#x4E00;&#x4E2A;&#x56F4;&#x7ED5; gitbook &#x53D1;&#x884C;&#x4E66;&#x7C4D;&#x7684;&#x793E;&#x533A;&#xFF0C;&#x4E8E; 2014 &#x5E74;&#x521D;&#x521B;&#xFF0C;GitBook.com &#x63D0;&#x4F9B;&#x514D;&#x8D39;&#x548C;&#x4ED8;&#x8D39;&#x7684;&#x670D;&#x52A1;&#xFF0C;&#x800C;&#x4E14;&#x514D;&#x8D39;&#x8D26;&#x6237;&#x5C31;&#x53EF;&#x4EE5;&#x4EAB;&#x53D7;&#x8BF8;&#x591A;&#x670D;&#x52A1;,&#x8FD9;&#x91CC;&#xFF0C;&#x6211;&#x4EEC;&#x5C06;&#x7F16;&#x5199;&#x7684;gitbook&#x4E66;&#x7C4D;&#x53D1;&#x5E03;&#x5230;Gitbook&#x4E2A;&#x4EBA;&#x8D26;&#x6237;&#x91CC;&#x3002;</p>
<p>&#x767B;&#x9646; <a href="gitbook.com">GitBook.com</a> &#x540E;,&#x5728;&#x7528;&#x6237;&#x9875;&#x9762;&#xFF0C;&#x70B9;&#x51FB;create a new book&#x540E;,&#x5982;&#x4E0B;&#x56FE;&#x6240;&#x793A;&#xFF1A;</p>
<p><img src="../imgs/create_gitbook.png" alt=""></p>
<p>&#x521B;&#x5EFA;&#x7684;&#x4E66;&#x7C4D;&#xFF0C;title:<code>gitbook&#x5165;&#x95E8;&#x6559;&#x7A0B;</code>,git url&#x4E3A;<code>https://git.gitbook.com/yuzeshan/gitbook-studying.git</code></p>
<p>&#x8FD9;&#x6837;&#xFF0C;gitbook.com&#x7EBF;&#x4E0A;&#x7684;&#x4ED3;&#x5E93;&#x5C31;&#x5EFA;&#x597D;&#x4E86;&#xFF0C;&#x7531;&#x4E8E;GitBook.com &#x4E0A;&#x7684;&#x6BCF;&#x672C;&#x4E66;&#x90FD;&#x4F7F;&#x7528; Git &#x9879;&#x76EE;&#x6765;&#x7BA1;&#x7406;&#xFF0C;&#x6240;&#x4EE5;&#xFF0C;&#x4E8B;&#x5148;&#x5199;&#x597D;&#x7684;&#x4E66;&#x7C4D;&#x5C31;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;git&#x63D0;&#x4EA4;&#x4E0A;&#x53BB;&#xFF0C;&#x5177;&#x4F53;&#x6B65;&#x9AA4;&#x5982;&#x4E0B;&#xFF1A;</p>
<ol>
<li>&#x9996;&#x5148;&#x6253;&#x5F00;cmd&#xFF0C;&#x8FDB;&#x5165;&#x4E66;&#x7C4D;&#x76EE;&#x5F55;&#xFF0C;E:\gitbook\gitbook-studying;</li>
<li>&#x8FD0;&#x884C;E:\gitbook\gitbook-studying&gt;<code>git init</code>&#xFF0C;&#x8FD9;&#x91CC;&#x5982;&#x679C;git&#x63D0;&#x793A;&#x9519;&#x8BEF;&#xFF0C;&#x5219;&#x662F;&#x6CA1;&#x914D;&#x7F6E;git&#x7684;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#x7684;path&#xFF1B;</li>
<li>&#x5C06;&#x76EE;&#x5F55;&#x7684;&#x7AE0;&#x8282;&#x6587;&#x4EF6;&#x5939;&#x4E00;&#x4E2A;&#x4E2A;&#x52A0;&#x8FDB;&#xFF0C;git&#x91CC;&#xFF0C;&#x4F7F;&#x7528;<code>git add &#x6587;&#x4EF6;&#x5939;&#x540D;</code>;</li>
<li>&#x63A5;&#x4E0B;&#x6765;&#xFF0C;<code>git commit -m &quot;&#x63D0;&#x4EA4;&#x4FE1;&#x606F;(&#x5FC5;&#x586B;&#xFF0C;&#x5426;&#x5219;&#x51FA;&#x9519;)&quot;</code>;</li>
<li>&#x7136;&#x540E;&#xFF0C;&#x5C06;&#x672C;&#x5730;&#x7684;git &#x4ED3;&#x5E93;&#x4E0E;gitbook.com&#x4E0A;&#x8FDC;&#x7A0B;&#x4ED3;&#x5E93;&#x8FDE;&#x63A5;&#xFF0C;<code>git remote add gitbook https://git.gitbook.com/yuzeshan/gitbook-studying.git</code>(&#x6CE8;&#x610F;:&#x4E0D;&#x662F;github&#x4E0A;&#x7684;git remote add origin git@....);</li>
<li>&#x6700;&#x540E;&#xFF0C;&#x5C06;&#x672C;&#x5730;&#x4ED3;&#x5E93;&#x5168;&#x90E8;push&#x5230;&#x8FDC;&#x7A0B;&#xFF0C;<code>git push -u gitbook maste</code>r&#xFF0C;&#x4EE5;&#x540E;&#x6BCF;&#x6B21;&#x66F4;&#x6539;&#xFF0C;&#x7136;&#x540E;add&#x518D;commit&#xFF0C;&#x800C;&#x7B2C;&#x4E8C;&#x6B21;push&#x65F6;&#xFF0C;&#x76F4;&#x63A5;<code>git push gitbook master</code>&#x5373;&#x53EF;</li>
</ol>
<p>&#x63D0;&#x4EA4;&#x5230; GitBook.com &#x540E;&#xFF0C;&#x4E66;&#x7C4D;&#x5C31;&#x81EA;&#x52A8;&#x53D1;&#x5E03;&#x4E86;&#xFF0C;&#x7528;&#x6237;&#x5C31;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x4E66;&#x7C4D;&#x7684;&#x5730;&#x5740;&#x8BBF;&#x95EE;&#x4E86;&#xFF0C;&#x4F8B;&#x5982;&#xFF1A;<a href="http://yuzeshan.gitbooks.io/gitbook-studying/content/" target="_blank">http://yuzeshan.gitbooks.io/gitbook-studying/content/</a></p>
<p><strong>ps:&#x5982;&#x679C;&#x672C;&#x5730;&#x6CA1;&#x6709;git&#x521D;&#x59CB;&#x5316;&#x8FC7;&#x5F97;&#x4ED3;&#x5E93;&#xFF0C;&#x5219;&#x53EF;&#x4EE5;&#x5C06;&#x5728;&#x7EBF;&#x5EFA;&#x7ACB;&#x7684;&#x4ED3;&#x5E93;&#xFF0C;&#x514B;&#x9686;&#x5230;&#x672C;&#x5730;&#xFF0C;&#x8FDB;&#x884C;&#x4FEE;&#x6539;&#xFF0C;&#x63D0;&#x4EA4;&#xFF0C;push&#xFF0C;&#x7B80;&#x6D01;&#x6B65;&#x9AA4;&#x5982;&#x4E0B;:</strong></p>
<ul>
<li>&#x9996;&#x5148;&#x8FDB;&#x5165;&#x60F3;&#x8981;&#x5EFA;&#x7ACB;&#x4E66;&#x7C4D;&#x7684;&#x76EE;&#x5F55;&#xFF0C;&#x8FD9;&#x91CC;&#x662F;E:\gitbook\gitbook-studying&#xFF1B;</li>
<li>&#x8FD0;&#x884C;&#x547D;&#x4EE4;<code>git clone https://git.gitbook.com/yuzeshan/gitbook-studying.git</code>;</li>
<li>&#x7136;&#x540E;&#xFF0C;&#x901A;&#x8FC7;&#x4E4B;&#x524D;&#x4ECB;&#x7ECD;&#x7684;&#x4E66;&#x7C4D;&#x7F16;&#x8F91;:gitbook init,gitbook serve &#x7B49;&#x65B9;&#x6CD5;&#xFF0C;&#x7F16;&#x8F91;&#x597D;&#x4E66;&#x7C4D;&#x540E;&#xFF0C;&#x518D;&#x7528;git&#x547D;&#x4EE4;add commit&#x6DFB;&#x52A0;&#x63D0;&#x4EA4;&#x4E66;&#x7C4D;&#x76EE;&#x5F55;&#x6587;&#x4EF6;&#xFF1B;</li>
<li>&#x6700;&#x540E;&#xFF0C;<code>git push gitbook master</code>&#x5373;&#x53EF;&#x3002;</li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../publish/index.html" class="navigation navigation-prev " aria-label="Previous page: 发布"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../publish/github.html" class="navigation navigation-next " aria-label="Next page: 发布到github仓库"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"fontSettings":{"theme":null,"family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
